package de.mizi.ui.statusbox;

import java.awt.Graphics;

/**
 * This abstract class represents some content in a StatusBox object.
 * @author mizi
 *
 */
public abstract class StatusBoxContent {
	protected int relativeX;
	protected int relativeY;
	
	/**
	 * Constructs a new StatusBoxContent object with the given relative
	 * position.
	 * @param relativeX the relative x position
	 * @param relativeY the relative y position
	 */
	protected StatusBoxContent(int relativeX, int relativeY) {
		this.relativeX = relativeX;
		this.relativeY = relativeY;
	}
	
	/**
	 * Get the x position of this StatusBoxContent object relative to the
	 * position of the StatusBox object it belongs to.
	 * @return the relative x position
	 */
	public int getRelativeX() {
		return relativeX;
	}

	/**
	 * Set the x position of this StatusBoxContent object relative to the
	 * position of the StatusBox object it belongs to.
	 * @param relativeX the relative x position
	 */
	public void setRelativeX(int relativeX) {
		this.relativeX = relativeX;
	}

	/**
	 * Get the y position of this StatusBoxContent object relative to the
	 * position of the StatusBox object it belongs to.
	 * @return the relative y position
	 */
	public int getRelativeY() {
		return relativeY;
	}

	/**
	 * Set the y position of this StatusBoxContent object relative to the
	 * position of the StatusBox object it belongs to.
	 * @param relativeY the relative y position
	 */

	public void setRelativeY(int relativeY) {
		this.relativeY = relativeY;
	}
	
	/**
	 * This method renders the specific StatusBoxContent object using the
	 * given font and the given position of the StatusBox it belongs to.
	 * @param g the graphics object of the StatusBox object this object belongs to
	 * @param yOffset the vertical offset of the font of the StatusBox object this object belongs to
	 */
	abstract public void render(Graphics g, int yOffset);
}
